package com.edgclub.edg.api.param;

import android.text.TextUtils;

import com.edgclub.edg.http.param.Params;
import com.edgclub.edg.utils.util.CryptUtil;

import java.util.TreeMap;

public class PostsParam extends Params {

	private String id;
	private String userId;
	private String maxId;
	private String page;
	private String pageSize;
	private String themeId;
	private String content;
	private String v;
	private String lat;
	private String lon;
	private String location;
	private String showLoc;
	private String redId;
	private String redNum;
	private String albumId;
	private String seqs;

	private String paramsValue;

	private String channelId;
	private String postsId;

	private String order;  //0：正序 register_1:倒序
	private String isOwner;//false：查看全部 true:只看楼主
	private String hasAlbum;// 0：没有图片 register_1：图片
	private String replyId; //被回复ID

	private String gold ;//金币值
	private String toUserId ;

	private String postUserId;
	private String state;
	private String black;

	private String source;

	@Override
	public TreeMap<String, String> getParams() {
		params = simpleParams();
		if (null != black && !TextUtils.isEmpty(black)) {
			params.put("black", black);
		}
		if (null != toUserId && !TextUtils.isEmpty(toUserId)) {
			params.put("toUserId", toUserId);
		}
		if (null != id && !TextUtils.isEmpty(id)) {
			params.put("id", id);
		}
		if (null != userId && !TextUtils.isEmpty(userId)) {
			params.put("userId", userId);
		}

		if (null != maxId && !TextUtils.isEmpty(maxId)) {
			params.put("maxId", maxId);
		}

		if (null != page && !TextUtils.isEmpty(page)) {
			params.put("page", page);
		}

		if (null != pageSize && !TextUtils.isEmpty(pageSize)) {
			params.put("pageSize", pageSize);
		}
		
		if (null != v && !TextUtils.isEmpty(v)) {
			params.put("v", v);
		}
		
		if (null != themeId && !TextUtils.isEmpty(themeId)) {
			params.put("themeId", themeId);
		}
		if (null != content && !TextUtils.isEmpty(content)) {
			params.put("content", content);
		}
		
		if (null != albumId && !TextUtils.isEmpty(albumId)) {
			params.put("albumId", albumId);
		}
		if (null != seqs && !TextUtils.isEmpty(seqs)) {
			params.put("seqs", seqs);
		}
		if (null != paramsValue && !TextUtils.isEmpty(paramsValue)) {
			params.put("params", paramsValue);
		}
		if (null != channelId && !TextUtils.isEmpty(channelId)) {
			params.put("channelId", channelId);
		}
		if (null != postsId && !TextUtils.isEmpty(postsId)) {
			params.put("postsId", postsId);
		}
		if (null != order && !TextUtils.isEmpty(order)) {
			params.put("order", order);
		}
		if (null != isOwner && !TextUtils.isEmpty(isOwner)) {
			params.put("isOwner", isOwner);
		}
		if (null != hasAlbum && !TextUtils.isEmpty(hasAlbum)) {
			params.put("hasAlbum", hasAlbum);
		}
		if (null != replyId && !TextUtils.isEmpty(replyId)) {
			params.put("replyId", replyId);
		}
		if (null != gold && !TextUtils.isEmpty(gold)) {
			params.put("gold", gold);
		}
		if (null != lat && !TextUtils.isEmpty(lat)) {
			params.put("lat", lat);
		}

		if (null != lon && !TextUtils.isEmpty(lon)) {
			params.put("lon", lon);
		}

		if (null != location && !TextUtils.isEmpty(location)) {
			params.put("location", location);
		}
		if (null != showLoc && !TextUtils.isEmpty(showLoc)) {
			params.put("showLoc", showLoc);
		}
		if (null != redId && !TextUtils.isEmpty(redId)) {
			params.put("redId", redId);
		}
		if (null != redNum && !TextUtils.isEmpty(redNum)) {
			params.put("redNum", redNum);
		}
		if (null != postUserId && !TextUtils.isEmpty(postUserId)) {
			params.put("postUserId", postUserId);
		}
		if (null != state && !TextUtils.isEmpty(state)) {
			params.put("state", state);
		}
		if (null != source && !TextUtils.isEmpty(source)) {
			params.put("source", source);
		}

		params.put("sign", CryptUtil.md5(convertParam()));

		return params;
	}

	public String getBlack() {
		return black;
	}

	public void setBlack(String black) {
		this.black = black;
	}

	public String getToUserId() {
		return toUserId;
	}

	public void setToUserId(String toUserId) {
		this.toUserId = toUserId;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getMaxId() {
		return maxId;
	}

	public void setMaxId(String maxId) {
		this.maxId = maxId;
	}

	public String getPage() {
		return page;
	}

	public void setPage(String page) {
		this.page = page;
	}

	public String getPageSize() {
		return pageSize;
	}

	public void setPageSize(String pageSize) {
		this.pageSize = pageSize;
	}

	public String getThemeId() {
		return themeId;
	}

	public void setThemeId(String themeId) {
		this.themeId = themeId;
	}

	public String getV() {
		return v;
	}

	public void setV(String v) {
		this.v = v;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getParamsValue() {
		return paramsValue;
	}

	public void setParamsValue(String paramsValue) {
		this.paramsValue = paramsValue;
	}

	public String getChannelId() {
		return channelId;
	}

	public void setChannelId(String channelId) {
		this.channelId = channelId;
	}

	public String getPostsId() {
		return postsId;
	}

	public void setPostsId(String postsId) {
		this.postsId = postsId;
	}

	public String getOrder() {
		return order;
	}

	public void setOrder(String order) {
		this.order = order;
	}

	public String getIsOwner() {
		return isOwner;
	}

	public void setIsOwner(String isOwner) {
		this.isOwner = isOwner;
	}

	public String getHasAlbum() {
		return hasAlbum;
	}

	public void setHasAlbum(String hasAlbum) {
		this.hasAlbum = hasAlbum;
	}

	public String getReplyId() {
		return replyId;
	}

	public void setReplyId(String replyId) {
		this.replyId = replyId;
	}

	public String getGold() {
		return gold;
	}

	public void setGold(String gold) {
		this.gold = gold;
	}

	public String getLon() {
		return lon;
	}

	public void setLon(String lon) {
		this.lon = lon;
	}

	public String getLat() {
		return lat;
	}

	public void setLat(String lat) {
		this.lat = lat;
	}

	public String getLocation() {
		return location;
	}

	public String getShowLoc() {
		return showLoc;
	}

	public void setShowLoc(String showLoc) {
		this.showLoc = showLoc;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public String getRedId() {
		return redId;
	}

	public void setRedId(String redId) {
		this.redId = redId;
	}

	public String getRedNum() {
		return redNum;
	}

	public void setRedNum(String redNum) {
		this.redNum = redNum;
	}

	public String getAlbumId() {
		return albumId;
	}

	public void setAlbumId(String albumId) {
		this.albumId = albumId;
	}

	public String getSeqs() {
		return seqs;
	}

	public void setSeqs(String seqs) {
		this.seqs = seqs;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getPostUserId() {
		return postUserId;
	}

	public void setPostUserId(String postUserId) {
		this.postUserId = postUserId;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}
}
